{% extends 'list/base.html' %}

{% block press_active %}
    active
{% endblock %}

{% block contenter %}
    <h1 class="page-header">出版社列表</h1>

    <!-- 面板-开始 -->
    <div class="panel panel-default">
        <div class="panel-heading">列表</div>
        <div class="panel-body">
            <!--表格上面的那一行-->
            <div class="row">
                <div class="col-md-4">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="请输入关键字查询...">
                        <span class="input-group-btn">
                      <button class="btn btn-default" type="button">搜索</button>
                    </span>
                    </div><!-- /input-group -->
                </div><!-- /.col-lg-6 -->
                <div class="col-md-1 pull-right">
                    <a class="btn btn-success pull-right" href="/add_press/">添加</a>
                </div>
            </div>
            <!--表格开始-->
            <div class="table-box">
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <td class="text-center">序号</td>
                        <td class="text-center">出版社ID</td>
                        <td class="text-center">出版社名称</td>
                        <td class="text-center">操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    {% for press in ret %}
                        <tr>
                            <td>{{ forloop.counter }}</td>
                            <td>{{ press.id }}</td>
                            <td>{{ press.press_name }}</td>
                            <td class="text-center">
                                <a class="btn btn-danger btn-sm" href="/delete_press?id={{ press.id }}">删除</a>
                                <a class="btn btn-info btn-sm" href="/edit_press?id={{ press.id }}">编辑</a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
            <!--分页开始-->
            <div>
                <nav aria-label="Page navigation" class="pull-right">
                    <ul class="pagination">
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li>
                            <a href="#" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <!--分页结束-->
        </div>
    </div>

{% endblock %}

